<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'list.jsp' starting page</title>
	<script type="text/javascript">
		function del(){
			if(confirm("确定删除用户？")){
				return true;
			}
			return false;
		}
	</script>
  </head>
  
  <body> 
    <h1>User List</h1>
    <hr>
    <table>
    	<tr>
    		<td>序号</td>
    		<td>姓名</td>
    		<td>年龄</td>
    		<td>删除</td>
    		<td>更新</td>
    	</tr>
    	<s:iterator value="#request.list" id="us">
    	<tr>
    		<td><s:property value="#us.id" /></td>
    		<td><s:property value="#us.name" /></td>
    		<td><s:property value="#us.age" /></td>
    		<td><s:a href="deleteUser.action?users.id=%{#us.id}" onclick="return del()">Del</s:a></td>
    		<td><s:a href="updataPUser.action?users.id=%{#us.id}">Updata</s:a></td>
    	</tr>
    	</s:iterator>
    </table>
  </body>
</html>
